/*
 * See: https://nodejs.org/dist/latest-v6.x/docs/api/events.html
 */
'use strict';

const EventEmitter = require('events');

class MyEmitter extends EventEmitter {}

const myEmitter = new MyEmitter();
myEmitter.on('event', () => {
  console.log('an event occurred!');
});
myEmitter.emit('event');